<?php

namespace App\Http\Controllers\Admin\GameTool;

use App\Http\Requests\Admin\GameTool\UserInfoIndexRequest;
use App\Services\GameTool\UserInfoService;
use App\Http\Controllers\Admin\BaseController;
use Illuminate\Http\Request;

class UserInfoController extends BaseController
{

    public function __construct(UserInfoService $userInfoService)
    {
        $this->userInfoService = $userInfoService;
    }

    //玩家信息 列表页
    public function index(UserInfoIndexRequest $request)
    {
        $reqChannelId = $request->channel_id;
        $reqServerId = $request->server_id;
        $reqPageSize = $request->page_size;

        //获取聊天频道
        $data = $this->userInfoService->getUserInfoList($request);

        return $this->view(null, compact(['reqChannelId', 'reqServerId', 'reqPageSize', 'data']));
    }

    //充值详情
    public function detail(Request $request)
    {
        $detail = $this->userInfoService->getUserInfoDetail($request);

        return $this->view(null, compact(['detail']));
    }
}
